package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.BaseAttrInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * projectName: gmall
 *
 * @author: 陈鹏
 * time: 2022/9/20 20:24 星期二
 * description:平台属性表的mapper映射
 */
@Mapper
public interface BaseAttrInfoMapper extends BaseMapper<BaseAttrInfo> {

    public List<BaseAttrInfo> selectAttrInfoByCategoryId(@Param("category1Id")Long category1Id,
                                                         @Param("category2Id")Long category2Id,
                                                         @Param("category3Id")Long category3Id);

    /**
     * 根据sku的id查询sku的全部平台属性名字和值(一对一)
     * @param skuId
     * @return
     */
    public List<BaseAttrInfo> selectAttrInfoBySkuId(@Param("skuId") Long skuId);
}
